@import "../../../base.less";

@import "./_var.less";

.@{prefix}-search {
  display: flex;
  justify-content: space-between;
  align-items: center;

  &__label {
    padding: 4px;
    color: @search-label-color;
  }

  &--center {
    text-align: center;
  }

  &__input-box {
    flex: 1;
    box-sizing: border-box;
    display: flex;
    height: @search-height;
    align-items: center;
    border: 1px solid @search-bg-color;
    background: @search-bg-color;
    padding: @search-padding;

    &.@{prefix}-is-focused {
      border-color: @search-bg-color;
    }

    &--round {
      border-radius: @search-round-radius;
    }

    &--square {
      border-radius: @search-square-radius;
    }

    .@{prefix}-input__keyword {
      display: inline-block;
      flex: 1;
      color: @search-text-color;
      font-size: @search-font-size;
      padding: 0 0 0 5px;
      border: 0;
      outline: none;
      resize: none;
      background: 0;
    }

    .@{prefix}-icon {
      color: @search-icon-color;
    }
  }

  &__clear {
    position: relative;
    margin-left: 10px;
    color: @search-clear-icon-color;
    .hotspot-expanded();
  }

  &__search-action {
    margin-left: 15px;
    font-size: @search-font-size;
    color: @search-action-color;
  }

  &__placeholder {
    color: @search-placeholder-color;
  }

  // mobile vue
  /* stylelint-disable-next-line */
  input::-webkit-input-placeholder,
  input::placeholder {
    color: @search-placeholder-color;
  }

  input[type="search"] {
    /* stylelint-disable-next-line */
    -webkit-appearance: none;
  }

  input::-webkit-search-decoration,
  input::-webkit-search-cancel-button,
  input::-webkit-search-results-button,
  input::-webkit-search-results-decoration {
    display: none;
  }
}
